project("AmarokRatingSync")


MESSAGE(STATUS  "===============================================================================")
MESSAGE(STATUS  "Configure ${PROJECT_NAME} :")
MESSAGE(STATUS  "-------------------------------------------------------------------------------")

cmake_minimum_required(VERSION 2.6)
find_package(Qt4 REQUIRED)
SET(EXECNAME "ratesyncrok")	 
	 
   
## Add the hdr directory to thej project
SET(HDR_DIRECTORY ./include)  

## Add the list of all .cpp files to the project
SET(CPP_SRCS 
	./src/main.cpp
	./src/MainWindow.cpp
)

## Add the list of all .ui files
SET(UI_FILES
	./src/MainWindow.ui
)

## Add the list of header files that should be treated with moc
## (all headers that have Q_OBJECT directive should be treated as MOC_HDRS)
SET(MOC_HDRS
	./src/MainWindow.h
)

## And finally Add the list of  resource file
SET(RC_FILES
   #./rc/viewer.qrc
)

## Enable the QT module (Don't forget to include ${QT_USE_FILE})
SET( QT_USE_QTCORE TRUE )
SET( QT_USE_QTGUI TRUE )
SET( QT_USE_QTSQL TRUE )
SET( QT_USE_QTXML TRUE )
INCLUDE( ${QT_USE_FILE} )

	 MESSAGE(STATUS  "LIB_FILES=${QT_LIBRARIES}")


## Generate resource
QT4_ADD_RESOURCES(RC_SRCS ${RC_FILES} )

## Generate moc source:
QT4_WRAP_CPP(MOC_SRCS ${MOC_HDRS} )


## Run uic on .ui files and create ui header in binary directory:
QT4_WRAP_UI(UI_HDRS ${UI_FILES} )
INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_BINARY_DIR} )


add_executable(${EXECNAME} ${CPP_SRCS} ${MOC_SRCS} ${RC_SRCS} ${UI_HDRS} )
include_directories(${HDR_DIRECTORY})
#add_dependencies(${EXECNAME} ${AVO_CORE_LIBRARY})
target_link_libraries(${EXECNAME} ${QT_LIBRARIES})


MESSAGE(STATUS  "SRC_FILES=${CPP_SRCS} | ${MOC_SRCS} | ${RC_SRCS} | ${UI_HDRS}")
MESSAGE(STATUS  "HDR_DIREC=${HDR_DIRECTORY}")
MESSAGE(STATUS  "LIB_FILES=${QT_LIBRARIES}")


MESSAGE(STATUS  "-------------------------------------------------------------------------------")
MESSAGE(STATUS  "")
